import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;


public class EmailChecker {
  
  public static final boolean isEmail(String s)
  {
    
    //Input the string for validation
    // String email = "xyz@.com";
    // Set the email pattern string
    Pattern p = Pattern.compile(".+@.+\\.[a-z]+");

    // Match the given string with the pattern
    Matcher m = p.matcher(s);

    // check whether match is found
    boolean matchFound = m.matches();

    StringTokenizer st = new StringTokenizer(s, ".");
    String lastToken = null;
    while (st.hasMoreTokens()) {
       lastToken = st.nextToken();
    }

    if (matchFound && lastToken.length() >= 2 && s.length() - 1 != lastToken.length()) {
       // validate the country code
       return true;
    }
    else return false;
  }
  
  public static void main (String args[]){
    System.out.println("" + isEmail(args[0]));
  }

}
